using AutoMapper;
using YayiMgr.Ability.Docking.CompanyApp.Dto;
using YayiMgr.Ability.Docking.DentalProceduresApp.Dto;
using YayiMgr.Ability.Docking.DentistsApp.Dto;
using YayiMgr.Ability.Docking.DictionaryApp.Dto;
using YayiMgr.Ability.Docking.ManufacturersApp.Dto;
using YayiMgr.Ability.Docking.SuppliersApp.Dto;
using YayiMgr.Ability.Docking.UserApp.Dto;
using YayiMgr.Domain.BasicData;
using YayiMgr.Domain.SystemBase;

namespace YayiMgrSystem.Ability
{
    public class YayiMgrProfile : Profile
    {
        public YayiMgrProfile()
        {
            //用户、注册、登录信息
            CreateMap<User,LoginSuccessDto>();
            CreateMap<UserRegisterCreateDto,User>();
            CreateMap<User,UserRegisterDto>();
            CreateMap<User,UserDto>();
            CreateMap<UserCreateDto,User>();
            CreateMap<UserUpdateDto,User>();
            
            //字典类型
            CreateMap<DictionaryType,DictionaryTypeDto>();
            CreateMap<DictionaryTypeCreateDto,DictionaryType>();
            CreateMap<DictionaryTypeUpdateDto,DictionaryType>();

            //字典子项
            CreateMap<DictionaryItem,DictionaryItemDto>();
            CreateMap<DictionaryItemCreateDto,DictionaryItem>();
            CreateMap<DictionaryItemUpdateDto,DictionaryItem>();

            //企业账号权限
            CreateMap<Company, CompanyDto>();
            CreateMap<CompanyCreateDto, Company>();
            CreateMap<CompanyUpdateDto, Company>();

            //牙医信息表
            CreateMap<Dentists, DentistsDto>();
            CreateMap<DentistsCreateDto, Dentists>();
            CreateMap<DentistsUpdateDto, Dentists>();

            //牙科治疗项目表
            CreateMap<DentalProcedures, DentalProceduresDto>();
            CreateMap<DentalProceduresCreateDto, DentalProcedures>();
            CreateMap<DentalProceduresUpdateDto, DentalProcedures>();

            //供应商
            CreateMap<Suppliers, SuppliersDto>();
            CreateMap<SuppliersCreateDto, Suppliers>();
            CreateMap<SuppliersUpdateDto, Suppliers>();

            //生产厂家
            CreateMap<Manufacturers, ManufacturersDto>();
            CreateMap<ManufacturersCreateDto, Manufacturers>();
            CreateMap<ManufacturersUpdateDto, Manufacturers>();
        }
    }
}
